home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / editors / mutt / me2s_pl7.zoo / mu_edit2 / util / const.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-05  |  1.3 KB  |  47 lines

  1. /* $Id: const.h,v 1.1 1992/09/06 19:31:32 mike Exp $ */
  2.  
  3. /* $Log: const.h,v $
  4.  * Revision 1.1  1992/09/06  19:31:32  mike
  5.  * Initial revision
  6.  *
  7.  */
  8.  
  9. /* const.h : constants, typedefs and macros that I use
  10.  * C Durland    Public Domain
  11.  */
  12.  
  13. #ifndef __CONST_H_INCLUDED
  14. #define __CONST_H_INCLUDED
  15.  
  16.     /* ***************************************************** */
  17.     /* ************ Constants ****************************** */
  18.     /* ***************************************************** */
  19.  
  20. #ifndef TRUE
  21. #define TRUE  1
  22. #define FALSE 0
  23. #endif
  24.  
  25. #ifndef NULL
  26. #define NULL 0
  27. #endif
  28.  
  29.     /* ***************************************************** */
  30.     /* ************ Typedefs ******************************* */
  31.     /* ***************************************************** */
  32.  
  33. typedef int  (*pfi)();        /* pointer to function returning int */
  34. typedef void (*pfv)();        /* pointer to function returning void */
  35.  
  36.     /* ***************************************************** */
  37.     /* ************ Macros ********************************* */
  38.     /* ***************************************************** */
  39.  
  40.     /* size of static array */
  41. #define NITEMS(array) (sizeof(array)/sizeof(array[0]))
  42.  
  43.     /* increment a type (usually pointer) by n bytes */
  44. #define INC_TYPE(type,ptr,n) (type)((char *)ptr +n)
  45.  
  46. #endif    /* __CONST_H_INCLUDED */
  47.